<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>自动生成表格</title>
    <script>document.addEventListener('DOMContentLoaded', function() {
        fetch('item4.json') // 确保这里的文件名与您的JSON文件名一致
            .then(response => response.json())
            .then(data => {
                const table = document.getElementById('myTable');
                data.forEach(item => {
                    if (item.qingdao_id === "unconditional_open") { // 根据qingdao_id筛选数据
                        const row = table.insertRow(-1);
                        const cell1 = row.insertCell(0);
                        const cell2 = row.insertCell(1);
                        cell1.textContent = "青岛市行政审批服务局"; // 固定的机构名称
                        cell2.textContent = item.count; // 具体的公示信息
                    }
                });
            })
            .catch(error => console.error('Error loading JSON:', error));
    });
    </script>
</head>
<body>
<table id="myTable" border="1">
    <thead>
    <tr>
        <th>机构名称</th>
        <th>公示信息</th>
    </tr>
    </thead>
    <tbody>
    </tbody>
</table>
</body>
</html>